Method of Generating Spanning Trees

ABSTRACT

A method of generating spanning trees in a network in which a plurality of network nodes are interconnected by links. The spanning trees are utilized for handling link and node failures. For link failures, each link has at least one tree that does not include that link. For node failures, each node has at least one tree to which the node is connected by a single link. A first spanning tree connects all of the nodes, and from each node one link is left unconnected. A second spanning tree includes all of the nodes and all of the unconnected links. Thus, none of the links is included in both trees. If a node failure prevents other nodes from communicating, a third spanning tree is needed. The method minimizes the number of required trees in large networks of any topology and can be implemented off-line.

TECHNICAL FIELD OF THE INVENTION

The present invention relates to a method of generating spanning treesin a network.

DESCRIPTION OF RELATED ART

Networks, such as Ethernet networks, for exchanging information includenodes interconnected by links. A connection that is set up between apair of end nodes in the network can suddenly fail due to a failure in anode or a link. Methods have been developed to detect the failingconnection.

“Spanning Tree Protocol” [1] (STP) was the first resiliency method forEthernet, which was mainly developed for avoiding loops to avoidcirculation of broadcast messages. STP also provides path redundancy bythe activation of unused links. In case of link failure, a former backuplink is activated in order to reach the separated network segment. Theconstruction of the spanning tree begins with the election of the rootbridge among the bridges. The rest of the bridges calculate the shortestdistance to the root bridge. The port providing this shortest path tothe root bridge is the root port. The bridges exchange spanning treecontrol information in Bridge Protocol Data Unit (BPDU) messages. Themain drawback of STP, used online, is its slow convergence. The failovertime is in the order of ten seconds, typically from 30 to 60 seconds,and depends on the number of network devices. A further drawback of STPis that it is hardly controllable. That is, the first tree can beconfigured but the tree formed after a failure is not predictable.

“Rapid Spanning Tree Protocol” [2] (RSTP) was the next step in theevolution of Ethernet resiliency protocols. It keeps the terminology andmost of the parameters same as in STP. The most important difference toSTP is that the number of possible operational states of ports arereduced from five to three states. Furthermore, message handling in aport does not depend on the role it plays in the spanning tree. BPDUsremained in the same format, just a few changes were introduced, i.e.all bits of the flag byte are used. One of the drawbacks of STP is thatnon-root bridges only generate BPDUs when a BPDU arrives on their rootport. As opposed to this, in RSTP every bridge generates so-called helloBPDUs in a predefined time interval, e.g. in every 2 seconds.Furthermore, a faster aging is applied for protocol information, i.e. itis immediately aged out if hellos are not received in three consecutivehello periods. Thus BPDUs are used as a keep-alive mechanism betweenbridges, which makes the recovery faster. The convergence time of RSTPis reduced to the order of seconds so it is still not applicable incarrier grade networks.

As ring topology plays an important role in optical networks, a specialloop protection and resiliency approach was developed for this topology.It is called “Ethernet Automatic Protection Switching” (EAPS) [3]. Inthis approach there is a so-called Master node in the ring, which blocksdata forwarding in one direction by blocking one of its ports. This portjust listens to the periodic messages sent out in the other port, whosearrival in time shows normal operation. These messages do not arrive incase of a failure, so the Master activates the formerly blocked port.The failure can be also indicated by any of the nodes with the help of aspecial message. After the reparation, the Master again blocks the port.The achievable recovery time is around 50 milliseconds. There is nobetter architecture for ring topology, however, this approach cannot beapplied in case of more complex topologies.

With the spreading use of Virtual LANs (VLAN) [4] it became obvious thatthe existing standard was not adequate as the same STP instance does notsuit for all VLANs and a spanning tree per VLAN is not tractable.Therefore, “Multiple Spanning Tree Protocol (MSTP) [5] was developed byIEEE. MSTP merges the best features of RSTP and VLAN. The mainimprovement introduced by MSTP is that several VLANs can be assigned toa single spanning tree instance. These instances are independent of eachother if there are more than one. The maximum number of spanning treeinstances depends on the Ethernet switches; it can even reach a thousandinstances. Thus, MSTP reduces the number of spanning tree instancesrequired to support a large number of VLANs. Furthermore, load balancingis also possible with MSTP by providing multiple paths. In addition tothis, the division of an Ethernet network into regions is also possible,which makes large networks more tractable by reducing the size of thespanning trees. Thus MSTP scales better than its ancestors but itsconvergence is not better than that of RSTP.

The properties of MSTP raise the idea of a fault tolerant approach thatis based on MSTP. This idea is also applied in Viking system [6], wherespanning trees are constructed such that there are at least twoswitching paths for any end-node pair in two different spanning trees,which do not share intermediate links or nodes. Each spanning treeinstance corresponds to a particular VLAN, thus explicit selection of aVLAN results in implicit selection of a spanning tree. In case offailures end-nodes have to change the VLAN in order to select analternate path. The failure detection is based on the support providedby network switches. Each switch in the network is configured to sendSNMP traps to the Central Manager in case of failures. The CentralManager is a central server, which is responsible for the overalloperation of the network including fault handling. After failurenotification, the central server finds out which VLANs are affected andinforms the end-nodes about the necessary reconfiguration in order touse the backup VLAN. Each of the end-nodes has to run a client module,which is responsible for VLAN selection during operation. Clients alsoinvoke load measurements of which results are sent periodically to theCentral Manager. Thus, there is a centrally coordinated trafficmanagement using the constructed spanning trees. The failover timeprovided by this system is slightly below a second.

The calculation of spanning trees is widely examined in the literature.Calculation methods were typically developed for weighted graphs wherethe weights represent the cost of the links. A good summary of thesemethods is described in reference [7]. There are methods to find klink-disjoint spanning trees with the smallest cumulative weight indirected and undirected graphs. Link disjoint spanning trees are onlyneeded if the whole tree needs to be backed up. If the backup is onlyfor a part of the network then the needed trees are not necessarily linkdisjoint. A distributed method for finding k minimum spanning trees wasdescribed in reference [7]. The authors of reference [8] propose amethod to find k spanning trees that are not necessarily disjoint buthave minimal total cost such that a penalty is paid for the multiple useof a link.

Each of the existing methods, which are described in the references [6],[7] and [8], have the same disadvantage, that is they result in a greatnumber of spanning trees because they construct link disjoint trees orminimum congestion trees. A great number of spanning trees is difficultto manage due to the limited number of VLAN IDs and the limited numberof spanning tree instances that can be handled in existing equipments. Agreat number of spanning trees will also make network management moredifficult.

SUMMARY OF THE INVENTION

The present invention is concerned with the abovementioned problem thatwith present methods a great number of spanning trees are required in anetwork to protect it against any single failure. The network inquestion can provide packet forwarding and resiliency based on thespanning trees.

A further problem is to take the type of network failure intoconsideration when the spanning trees are generated.

The problem is solved by firstly observing that for each network elementthere has to be at least one spanning tree that does not fall into twoor more parts in case of the breakdown of that particular element. Toprotect the network against link failure this means that for each linkthere has to be at least one spanning tree that does not include thatparticular link. For node failure it means that for each node thattransports traffic there has to be at least one spanning tree in whichthat particular node is an end node, a so called leaf, i.e. is a nodewhich is connected to the spanning tree via a single link. Thus thesolution includes a first phase in which spanning trees for handlinglink failures are generated. If also node failures are to be handled itis investigated in a second phase whether further spanning trees have tobe generated.

Somewhat more in detail the problem is solved by, in a first phase,generating spanning trees to protect the network against link failure.If desired the network is also protected against node failure in asecond phase, which may require that at least one spanning tree isadded. The first phase includes successively connecting nodes in thefirst spanning tree until all the nodes of the network are connected tothe tree. In this first spanning tree at least one link is leftunconnected from every node if that is possible. A further spanning treeis generated which includes the unconnected links. Thus at least twospanning trees are geneated to protect the network against any singlelink failure. It is then checked that for each link there is at leastone spanning tree that does not, include that particular link. If thatrequirement is not fulfilled at least one further spanning tree isgenerated in the first phase which tree does not include the link inquestion. In the second phase it is checked whether any node thatgenerates traffic fulfils the requirement that it is an end node, aleaf, in at least one of the trees. If not so still at least onespanning tree is generated to fulfil the requirement.

A purpose with the invention is to generate only a relatively smallnumber of spanning trees in a network, which trees can be used e.g. toprotect the network against any single failure.

Another purpose is to first generate spanning trees, which make itpossible to protect the network against any single link failure.

A further purpose is to also generate a spanning tree to protect thenetwork against any single node failure.

Still a purpose is to generate the spanning trees off-line, i.e. beforestart up of the network.

An advantage is that the proposed method generates a low number ofspanning trees for any network topology.

Still an advantage is that it can be selected if spanning trees forhandling only link failures are to be generated or if spanning trees foralso handling node failures are to be added.

A further advantage is that the spanning trees can be configuredoff-line in a network before it is started up.

Still another advantage is that the method is simple to implement.

The invention will now be described with the aid of preferredembodiments and with reference to the enclosed drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a view over a network;

FIG. 2 shows a view over a network with a set of spanning trees;

FIG. 3 shows a view over the network in FIG. 2 with an alternative setof spanning trees;

FIG. 4 shows a flowchart for node selection;

FIG. 5 shows a flowchart for link selection;

FIGS. 6-11 show views over a network and generation of the firstspanning tree;

FIGS. 12-14 show views over the network and generation of the secondspanning tree;

FIG. 15 shows a view over the network and generation of the thirdspanning tree;

FIG. 16 shows a flowchart for generating spanning trees for handlingnode failures;

FIGS. 17-23 show views over the network and generation of a spanningtree for handling node failures;

FIG. 24 shows a three-dimensional diagram over necessary number ofspanning trees;

FIG. 25 shows a three-dimensional diagram over the number of spanningtrees for handling link failure, and

FIG. 26 shows a three-dimensional diagram over the number of spanningtrees for handling node failure.

DETAILED DESCRIPTION OF EMBODIMENTS

A method for configuration of spanning trees in networks is proposedwhich can be applied in e.g. Ethernet segments consisting of standardEthernet switches available on the market. The extra functionalitiesthat are needed for providing resiliency can be implemented in edgenodes of the Ethernet network, which are typically IP routers. FIG. 1shows as an example a network NW1, in which the proposed method can beapplied. The network has edge nodes A1, B1, C1 and D1 and also switchnodes SW1, SW2, SW3 and SW4 and all the nodes are interconnected bylinks L1. After configuring spanning trees S1, S2 and S3 by the proposedmethod, failure detection and traffic redirection, which are theso-called additional functionalities, can be invoked in edge nodes.

Multiple spanning trees can be generated for providing protectionswitching. Static spanning trees are configured in the network such thatthere remains at least one complete tree in the case of a single failureof any network element. As an example, a VLAN is assigned to eachspanning tree, so traffic forwarding to a tree can be controlled withthe help of VLAN IDs in the edge nodes. That is, in this exampleprotection switching becomes VLAN switching in this network. In theexample network NW1 shown in FIG. 1, all the three spanning trees S1, S2and S3 are needed to handle any single failure. In the case of a failureeach of the edge nodes A1, B1, C1 and D1 need to stop forwarding framesto the affected trees.

Before the configuration of port priorities in a network, a method isneeded to generate a number of spanning trees that provide protectionagainst single failures. The number of trees should be minimised due tothe limited number of VLAN IDs (4096) and the implementation dependentlimit on the number of spanning tree instances supported in Ethernetswitches. Tree generating is invoked before configuration of portpriorities for MSTP, so the proposed method does not need to beoptimised for speed.

In the Ethernet network, VPN (Virtual Private Network) separation may besolved by VLANs. In this case multiple spanning trees may be reservedfor each VLAN. In the worst case the number of VPNs multiplied by thenumber of spanning trees may give the total number of needed VLAN IDs.The reason for this is that traffic of VPNs need to be separated even atfailures and each VPN requires as many VLANs as the number of neededspanning trees in the network. Note that a spanning tree instance can beassigned to several VLANs.

The proposed, novel method for the generation of static spanning treesdetermines a small number of spanning trees to solve fault handling.These trees have to be determined before the configuration of thenetwork, so the proposed method is run off-line.

The construction of spanning trees is split up into two phases accordingto the two types of failures aimed to be handled. The first phasedetermines the spanning trees needed to protect against single linkfailures. The second phase determines the additional spanning treesneeded for protecting against node failures after having the spanningtrees for link failure. Each spanning tree for handling link failureconnects all the nodes of a network.

The method generates spanning trees for a network and at least one ofthe spanning trees remains complete in case of the breakdown of anysingle network element. For this reason, the requirements for thespanning trees can be formulated in the following way for the two typesof failures:

-   -   Link failure: For each link, there has to be at lest one        spanning tree that does not include that particular link.    -   Node failure: For each node, that transports traffic there has        to be at lest one spanning tree where that particular node is a        leaf, i.e. that node is connected to its spanning tree via a        single link.

If these requirements are fulfiled then there is for each failure atleast one spanning tree that is not affected by a failure. Thus thetraffic can be transmitted on this tree. FIG. 2 illustrates therequirements defined above. The figure shows a network NW2 with edgenodes A, B, C, D, E, F and G and also switch nodes H, I and K. The edgenodes A-G have external connections outside the network as isexemplified with a connection EC1 from node A. The nodes areinterconnected by links L2 and three spanning trees ST1, ST2 and ST3 areset up in the network. Each of the spanning trees connects all thenodes. The spanning trees ST1 and ST2 are the ones that protect thenetwork NW2 against link failure. As it can be seen none of the links L2in the network NW2 is included in both the spanning trees ST1 and ST2,so the first requirement is met. However, the edge node B is not a leafin either of the trees, i.e. the constraint for node failure is not met.If node B is broken down then node A cannot communicate with node C andnode D via either of the spanning tree ST1 or ST2. Therefore a thirdspanning tree is needed where node B is a leaf, which is the spanningtree ST3 in FIG. 2. Thus, the example network NW2 is also protectedagainst node failures.

FIG. 3 shows the network NW2 with an alternative set of spanning treesST4 and ST5. These spanning trees fulfil the above requirements forprotection against link failures. The spanning trees ST4 and ST5 differfrom the spanning trees ST1 and ST2. FIG. 3 demonstrates that differentsets of spanning trees can be used to protect the same network againstfailure.

The two proposed method phases are described more in detail in thefollowing. The first phase for link failures has to be invoked first andafter that the second phase for node failures if desired. The methodfulfils the requirements with a small number of spanning trees. Itshould be noted that at least for simpler networks, as e.g. the networkNW2, it is possible to use the proposed method as described andexemplified above without going into all details of the method asdescribed below.

Link Failure (First Phase)

In order to protect a network against link failure its topology has tobe 2-connected and at least two spanning trees are needed. 2-connectedmeans that cutting any of the links the network will not fall into twoparts but remain connected. Two trees are only enough though if thereare enough links to build up two link disjoint trees. However, thiscondition is typically not met in case of real network topologies hencetypically more than two trees are needed. The proposed method tries tofulfil the requirement with two trees and applies additional trees onlyif needed. The construction of the first tree is very important as itdetermines the possibilities when building the latter trees. Therefore,the first tree strongly influences the number of trees needed to fulfilthe requirements. In the embodiment the method first tries to constructa star-like tree beginning with the node having the highest degree andthen always connects the neighbours having highest degree. It is veryimportant that during the construction of the first tree the methodtries to reserve at least one link from each node for the second tree.If it is not possible to reserve one link then two trees are not enough.The second tree is then based on the complement of the first onefollowed by further trees if needed.

The flowchart of the first method phase that determines the spanningtrees for link failure is depicted in FIG. 5. The spanning tree underconstruction is denoted by T_(i), where i denotes the number of thetree. A counter c is assigned to each link in the network, which showsthe number of spanning trees where the link is included. Thus, thepreviously described requirement for handling link failures can beformulated as c has to be less than i for each link. The followingattributes are assigned to each node:

leaf: shows if there is a tree where the node is a leaf, i.e. it isconnected to the rest of the network via a single link in any of thetrees

degree: the degree of the node, i.e. the number of physical linksconnected to the node, denoted by De

usage: the ratio of the total number of links originating from the nodein all trees and the degree of the node denoted by Us

MAC: the smallest MAC address belonging to the node.

Nodes have to be selected based on the above attributes several timesduring the operation of the method. The sub-method that selects a nodeis depicted in the flowchart in FIG. 4 which will be described first.Then the flowchart in FIG. 5 will be described.

The submethod starts in a step 40 and in a step 41 the node or firstgroup G of nodes having the highest degree is selected. In a step 42 itis determined whether the found node is unique. If yes in an alternativeY1 the method ends in a step 46. If the node is not unique, alternativeN1, it is selected a node or second group G2 of nodes among them havingthe smallest usage in a step 43. In a step 44 it is determined whetherthe node is now unique. If yes in an alternative Y2 the method ends instep 46. If not so in an alternative N2 the node having the smallest MACaddress among them is selected. This selection is unambiguous and thesubmethod ends definitely in the step 46.

In FIG. 5 the first method phase starts in a step 500 in which thenumber of tree value i=0 and the counter c=0 for all links. In next step501 the value i is increased by 1 and construction of the correspondingtree T_(i) begins. Links for which the counter c<i−1 are added to thetree under construction in a step 502. If in this step i=1 (first tree)the expression c<i−1 has no meaning since it is defined that always c≧0.The step is then ignored. In a step 503 a central node is selectedaccording to the submethod in FIG. 4. In a step 504 it is checked ifthere is any link from the selected node for which the link countercriterion c<i−1 is valid. If the criterion is fulfiled, an alternativeY3, next link is added in a step 505 and the link criterion is checkedagain in the step 504. If it is the first tree, i=1, at least one linkis always saved for the next tree in the step 505. If the criterionc<i−1 in step 504 is not valid according to an alternative N3 it ischecked in a step 506 whether the tree is complete. This criterion isc<1 for the first tree. If it is not, in an alternative N4, it ischecked in a step 507 whether the central partly tree has a leaf nodethat has an isolated neighbour that has a link assigned to the treeT_(i). Then the alternative Y5 and the node selection procedure shown inFIG. 4 is invoked and the links belonging to the node are examinedaccording to step 504. Otherwise the alternative N5 is valid and it ischecked whether a leaf of the partly tree has isolated neighbour.Alternative Y6 and one of these leaf nodes is selected in step 510 andthe connection possibilities are examined in step 506. Otherwisealternative N6 is valid and the same are examined for non-leaf nodes ofthe partly tree. During these examinations it is stored which node wasexamined last. If the algorithm finds an examines the same node againand again in steps 507-513 then it is not possible to include a new linkto the partly spanning tree considering the link criterion. Therefore, anode is selected in step 516 and a new link is included in step 505 suchthat step 504 is ignored for a single step. If in step 506 the tree iscomplete, an alternative Y4, then it is checked in a step 517 if thecounter c=i. If it is so, according to an alternative Y10, a new treemust be constructed beginning with the step 501. If on the other handc<i, according to an alternative N10, the first method phase ends in astep 518.

The operation of the method as described above is further commented inthe following. As appears, first the so-called central node is selectedfor the spanning tree calculations according to the sub-method shown inFIG. 4. This central node is just the starting point of the treeconstructions for all the trees, but otherwise the central node is notdistinguished from other nodes. There is a special rule in the step 505only taken into account during the construction of the first tree, thatis, the method tries to reserve a link from each node for the secondtree. If this is not possible then two trees are not enough. In case offurther trees, first all links having smaller counter value c than thenumber of ready trees (i−1) are added to the new tree. If a node of thenew tree is selected (the central node is the first one) then the linkstowards isolated nodes are added to the new tree, which is actuallyunder construction, if they meet the link counter criterion c<i−1.Another leaf or node of the new tree is then selected and its isolatedneighbours are tried to be connected. If no new link can be added to thetree insisting on the link counter criterion then a link is addedignoring this criterion. Another tree is then necessary to fulfil theabove stated requirement for link failure. New links are added till thetree becomes complete and new trees are constructed until therequirement for link failure is met.

In connection with FIGS. 6-15 will be described an example on generatingspanning trees intended for handling link failures in a 4×4 nodes gridnetwork NW3. The selection of nodes and links follow FIGS. 4 and 5.

The network NW3, shown in FIG. 6, has sixteen nodes N3 interconnected bylinks L3. The nodes have numbers 1-16 denoting the MAC address for therespective node. These MAC addresses are also used as references toidentify the nodes in the following description.

The tree construction starts in FIG. 5, step 500. Notice that from thebeginning there is no tree, i=0, and the link counter is c=0 for all thelinks. In step 501 the number of the tree is set to i=1 and in step 502nothing can be done since counter c<0 does not exist. In step 503 thecentral node is selected as shown in FIG. 7, the selection performed inaccordance with FIG. 4. In step 41 the nodes 2, 5, 6 and 11 with thehighest degree 4 are selected, in step 42 it is noticed that they allhave the same degree and are not unique, alternative N1, and in step 43it is also noticed that the all have the usage Us=0 since there is notyet any tree with links. They are therefore not unique in this respecteither, according to step 44 alternative N2, but in step 45 the node 2with the lowest MAC address is selected as central node. In step 504 therequirement c<0 has to be ignored, as above, but there are four links tothe nodes 11, 14, 8 and 5 which can be added to the first tree T₁ fromthe central node 2 in step 505. According to FIG. 4, first links to thenodes 5 and 11 with the degree 4 are selected and then the link to thenode 8 is selected, the node having the same degree 3 and usage Us=0 asnode 14 but with the lowest MAC address 8. The link to the node 14 isnot added according to the rule in step 505 for the first tree, i=1.Building of the first tree T₁ continues since the first tree is notcomplete, alternative N4 in step 506. According to the step 509 one ofthe nodes 8, 5, 11 has to be selected and the requirement c<0 is ignoredas it is the first tree. According to FIG. 4, step 45, node 5 isselected as it has the same degree 4 and the same usage Us=¼ as node 11but has the lowest MAC address. Back to step 504 a further link fromnode 5 has to be added according to the alternative Y3. In FIG. 8 thislink is selected according to FIG. 4, step 41 and step 42 alternative Y1to node 6 with the highest degree 4. The procedure with step 504 isrepeated and in step 45 the link to the node 1 is added since node 1 hasthe same degree and usage as node 12 but lower MAC. The link to node 12is not added according to step 505. The tree is not complete,alternative N4 in step 506. According to the step 509 (and c<0 isignored) one of the nodes 8, 1, 6 and 11 has now to be selected. Thenode 6 with highest degree and lowest MAC is selected, step 41 and step45. FIG. 8 also shows the successive selection of links from node 6 tothe nodes 4 and 9 according to steps 504 and 505. The link to node 11 isexcluded according to step 505. The first tree T₁ is not complete, step506 alternative N4, and in FIG. 9 one of the nodes 8, 1, 4, 9 and 11 hasto be selected according to step 509. According to step 41 and 42,alternative Y1, the node 11 is selected. From node 11 the links to nodes0 and 15 are selected according to first step 504 and then step 45. Alsothe step 505 for i=1 is fulfilled. According to step 506, alternativeN4, and step 509 one of the nodes 0, 15, 8, 1, 4 and 9 has to beselected. According to step 45 the node 0 is selected. The link to node13 is then selected according to step 504 and step 41, 42 alternativeY1. Also this selection is shown in FIG. 9. Now turn to FIG. 10. In thesame way as node 13 was connected to the first tree with its link thenode 7 is connected from node 1 and then the node 3 is connected fromnode 4, keeping one link from every node unconnected. As shown in FIG.11 the node 12 is connected via its link to node 8, node 14 is connectedto node 15 and node 10 is connected to node 14. The three last nodes areconnected in the described order and in the same way as the node 13. Inthe next step in the procedure it is observed that the first tree T₁ isready according to step 506, alternative Y4. In step 517 it is statedthat for all links c=i except for the links reserved in step 505. Thismeans that the alternative Y10 in step 517 is valid and that nextmeasure in the procedure is step 501, in which the tree number parameteris increased to i=2.

The construction of the second tree T₂ is shown in FIGS. 12-14. All thelinks which had the counter c<2−1, i.e. c=0, in FIG. 11 are added to thesecond tree, according to the step 502, and are shown in FIG. 12.According to the step 503 the central node is selected, which isperformed in accordance with FIG. 4: the nodes 2, 5, 6 and 11 have allthe degree 4 and the usage ¾. The node 2 is thus selected as centralnode according to step 45. In step 504 the alternative N3 is valid sinceall links from node 2 have the counter value c=2−1 and the tree is notready so in step 506 the alternative N4 is valid. According to step 516and 507 the link to node 5 is selected as shown in FIG. 13. This Figurealso shows that the procedure of adding a link is repeated, steps 504,506 and 516, and first the link between nodes 15 and 14 is added andthen the link between the node 7 and the node 1 is added to the secondtree T₂. In FIG. 14 is shown that the links between the nodes 4 and 3,nodes 0 and 11 and nodes 2 and 8 are successively added according to thesteps 516, 507, 504, 505 and 511. When step 506 is applied again thealternative Y4 is valid since the second tree T₂ is complete. In step517 at least one link is found which has the counter value c=2 and thealternative Y10 is valid. Still a tree must be constructed to make itpossible to handle link failures.

The construction of the third tree is described in connection with FIG.15. The construction begins in step 501 and the tree number is set toi=3. The link counter c up to now for the different links appears fromFIG. 14. Links having the counter c<3−1=2, i.e. c=1, are to be added tothe third tree T₃ according to step 502. The node 2 is selected as thecentral node just as before according to step 503 and the links areadded according to the flowchart in FIG. 4. Thus those links are addedwhich connect the nodes in the following sequence: node 11, 6, 5, 1, 12,14, 4, 10, 8, 7, 9, 0, 13, 15 and 3. It is then checked in step 506 ifthe third tree T₃ is complete which is the case, so the alternative Y4is valid. In step 517 the alternative N10 is valid since for all linksthe link counter C<3 and the tree construction for handling linkfailures is ready.

To determine the number of spanning trees needed to handle single linkfailures is a hard problem. Although, a rough estimation can be givenfor the average degree needed in a network to build up a given number ofspanning trees. Let n denote the number of nodes in the network and kthe number of desired spanning trees. If one would build up the networkfrom link disjoint trees then the number of necessary links was:

e=k·(n−1).

However, to fulfill our assumed requirements fewer trees are enough. Thelinks are best utilised from spanning tree perspective, if all links areincluded in k−1 trees. Thus, the number of necessary links is reducedto:

$e = {\frac{k}{k - 1}{\left( {n - 1} \right).}}$

Thus, the minimum average degree, denoted by D, can be calculated as:

$\begin{matrix}{D = {\frac{2 \cdot e}{n} = {\frac{2 \cdot k \cdot \left( {n - 1} \right)}{\left( {k - 1} \right) \cdot n}.}}} & (1)\end{matrix}$

If the average degree is D in a network then the constraint cannot benecessarily met with the help of k trees. This average degree is only anecessary condition, that is, D only shows the threshold below which itis not possible to fulfil the requirement with k trees in an n nodenetwork. The minimum of D is naturally 2 hence each node has to beconnected at least by two links in the network in order to assure anytype of resiliency. For instance, if someone wants to use 2 spanningtrees in a 500-node network then the necessary average node degree is atleast 4.

The lower limit for the number of necessary trees at a given number ofnodes and links can then be calculated based on (1) the following way:

$\begin{matrix}{k = {\frac{e}{e - n + 1}.}} & (2)\end{matrix}$

This is a theoretical lower bound for the number of necessary spanningtrees for handling link failure. Typically there need more trees becauseall links are generally can only be included in less than k−1 trees,which was our assumption during the above calculations.

Node Failure (Second Phase)

A simple method is proposed for determining the spanning trees needed tohandle node failures, of which flowchart is shown in FIG. 16. This partof the method is invoked after the one for handling link failures shownin FIG. 5. In FIG. 16 the method starts in a step 160. In a step 161 itis investigated if there is any node that is not a leaf in any of thetrees, which are constructed until now. In an alternative Y11 the numberof trees i is increased by one, i:=i+1, in a step 162. In this step alsothe present leaf nodes are added to the new spanning tree. In a step 163a non-leaf node is selected which is to be added to the new tree. Thisnon-leaf node is connected to an earlier leaf node if possible via asingle link. In a step 164 it is investigated if there is anyunconnected non-leaf node. In an alternative Y12 the step 164 isrepeated and in an alternative N12 it is investigated in a step 165 ifthe new tree is complete. In an alternative Y13 the procedure from thestep 161 is repeated. In an alternative N13 isolated nodes are connectedto the present spanning tree. If it is possible these nodes are notconnected via nodes which are leaf nodes only in the present spanningtree T_(i). In the step 161 there is an alternative N11 if no furthernon-leaf node can be found. In that case leaf nodes and their singlelink are removed if the leaf node does not generate traffic from thetrees, step 167. Examples on such nodes are the internal switch nodesSW1-SW4 in FIG. 1. The method ends in a step 168.

In connection with FIGS. 17-23 will be described an example onconstruction of node failure spanning trees for handling of nodefailures in the grid network NW3. Link failures in this network arehandled by the spanning trees T₁, T₂, and T₃. It appears from the abovedescription of the network NW3 that the nodes 0, 1, 2, 5, 11, 12 and 14are non-leaf nodes. As described above, failures in such nodes cannot behandled with the aid of the spanning trees T₁, T₂, and T₃. The treeconstruction starts in step 161, alternative Y11, stating that there arenon-leaf nodes. In step 162 all the nodes of the network NW3 but thenon-leaf nodes 0, 1, 2, 5, 11, 12 and 14 are connected to a fourthspanning tree T₄ as shown in FIG. 17. In step 163 the node 0 isconnected to node 9 and in step 164 it is found that the node 1 isunconnected. This node is connected in step 163 to node 4. Thisprocedure is repeated until each of the non-leaf nodes is connected to aleaf node as shown in FIG. 18. It is then found in step 165 that thetree is not complete. In step 166 node 12 is connected to node 5 andnode 7. FIG. 19 shows that the spanning tree T₄ is now complete, step165 alternative Y13, but nodes 5, 11 and 12 are found to be non-leaf instep 161. Therefore a spanning tree T₅ is constructed according to steps162-165. As shown in FIG. 20, first leaf nodes are added to the tree T₅.Then the non-leaf nodes are connected, FIG. 21. When the spanning treeT₅ is complete there is no further non-leaf node, step 161 alternativeN11. Then node 2 is removed from the tree T₄, as shown in FIG. 22, andnodes 5 and 11 are removed from the spanning tree T₅, FIG. 23, allaccording to step 167. Construction of the spanning trees T₄ and T₅ isnow finished and the network NW3 is protected also against node failurestoo.

There is an advantage of separating the calculation of spanning treesfor handling the two types of failures, link and node failure. If onedoes not want to protect the network against node failures but onlyagainst link failures then it is enough to build up the spanning treesaccording to the output of the first method phase. Thus, the number ofrequired VLANs can be reduced at the price of robustness.

Verification of Spanning Tree Calculation Methods

The above described method is based on heuristics because the problem itaims to solve is complex. The proposed method phases are for genericnetworks and they result in optimal or close-optimal solution in termsof the number of necessary spanning trees for any network. A numericalverification of the methods will be described below, which shows thatthey result in a close to optimal solution regarding the number ofspanning trees.

First, the proposed method can be compared to the other similar approachproposed in [6], [7], which as far as could be found is the only similarone existing in the literature. The authors of [7] evaluated theirmethod on grid topology. According to their method, the minimum numberof spanning trees is 38 in an 8×8 grid, which consists of 64 nodes.

The present method described above results in 3 spanning trees forhandling link failures in case of any size of grid. At most two morespanning trees are added by the method for avoiding the effect of nodefailures independently of the size of the grid. Thus, the present methodneeds only 5 spanning trees to have a resilient grid network of anysize. For instance the method was run in a 50×50 grid where 5 trees arealso enough to handle both link and node failures. The method results infour spanning trees for grid networks in some cases. In connection withFIGS. 6-15 and 17, 18 was described the output of the method for the 4×4grid network NW3.

Grid is a network topology having good connectivity among the nodesbecause the degree of all nodes is 4 except for 4 nodes in the cornerwhose degree is only 2 and the winger nodes whose degree is only 3. Thusthe average node degree is close to 4 but never reaches 4. Therefore, 2spanning trees are not enough but 3 are needed to make grids of any sizeresistant against link failure according to Equation (1). The firstmethod phase for link failures provides this theoretical minimum. Byadding two more spanning trees the grid is also made resistant againstnode failures.

The proposed method is also verified on random networks, of whichtopology is random generated at given number of nodes and average nodedegree. The method is evaluated with several node and average degreesettings, 50 simulations for each setting. FIG. 24, FIG. 25 and FIG. 26show the number of necessary spanning trees. These figures show each athree dimensional diagram with an average degree ADN of the nodes on afirst axis and a number NoN of nodes on a second axis. The result is asurface which indicates a number NST of spanning trees. The theoreticallower bound for link failures calculated from the necessary condition(Equation (2)) is seen in FIG. 24. The average of the 50 resultscalculated by the present method is shown for link failures in FIG. 25and for node failures in FIG. 26. The number of spanning trees dependson the network size and the average degree of the nodes in the network.

It can be seen in FIGS. 24-26 that the method for link failure resultsin numbers close to the theoretical minimum. For example, in case ofnetworks consisting of 30 nodes whose average degree is 3.5, a point P1in FIG. 24, the theoretical minimum for handling link failure isNST=2.85. The present first method phase for link failures provides avalue NST=3.08 in a point P2 of FIG. 25 and the second method phase fornode failures provides a value NST=4.92 in a point P3 of FIG. 26. Thisshows that the present method provides a close-optimal solution. Thenumber of additional spanning trees for handling node failure does notincrease significantly the total number of spanning trees, therefore, itis also close to optimal.

Above has been referred to the following references:

-   [1] IEEE 802.1d, Standard for local and metropolitan area    networks-Media access control (MAC) bridges.-   [2] IEEE 802.1w, Standard for local and metropolitan area    networks-Rapid reconfiguration of spanning tree.-   [3] E. Shah, “Ethernet automatic protection Switching”, RFC3619,    October 2003.-   [4] IEEE 802.1q, Standard for local and metropolitan area    networks-Virtual bridged local area networks.-   [5] IEEE 802.1s, Standard for local and metropolitan area    networks-Multiple spanning trees.-   [6] S. Sharama, K. Gopalan, S. Nanda and T. Chiueh, “Viking: A    multispanning-tree Ethernet architecture for metropolitan area and    cluster networks”, INFOCOM 2004.-   [7] A. Young et al., “Overlay mesh construction using interleaved    spanning trees”, INFOCOM 2004, March 2004.-   [8] R. F. F. Werneck, J. C. Setubal and A. F. Conceicao, “Finding    minimum congestion spanning trees”, ACM Journal of Experimental    Methods, 2000.

1-6. (canceled)
 7. A method of handling link and node failures in anetwork having a plurality of nodes interconnected by links, said methodcomprising the steps of: generating a plurality of spanning trees; andutilizing the spanning trees to handle the link and node failures;wherein the generating step includes: generating at least two differentspanning trees, wherein at least one link is left unconnected in each ofthe spanning trees, and the unconnected link in one of the trees isconnected in at least one of the other spanning trees; selecting one ofthe nodes as a central node for a predetermined spanning tree;successively selecting neighbor nodes and connecting the neighbor nodesto the central node; successively selecting further nodes and connectingthe further nodes to the earlier connected nodes until all of thenetwork nodes are connected in the predetermined spanning tree; whereina node degree (De) is defined as the number of physical links connectedto a given node, and a node usage value (Us) is defined as a ratio ofthe total number of links originating from the node in all the trees andthe degree (De) of the node, and the generating step also includes:selecting a first group (G) of nodes having a degree of the highestvalue among the degrees of all the nodes; selecting the only member ofthe first group given that the first group has only one member; when thefirst group (G) has more than one member, selecting a second group (G2)to be the members of the first group (G) having the smallest usage value(Us); selecting the only member of the second group (G2) given that thisgroup has only one member, and when the second group (G2) has more thanone member, selecting the member of the second group (G2) having thesmallest MAC address.
 8. The method according to claim 7, furthercomprising the steps of: (a) determining at least one of the links whichis included in all of the spanning trees; (b) generating a furtherspanning tree from which at least one of the links determined in thepreceding step is excluded; and (c) repeating steps (a) and (b) untilall the links of the network are excluded from at least one of thegenerated spanning trees.
 9. The method according to claim 8, whereinthe same node is selected as the central node for all of the spanningtrees.
 10. The method according to claim 7, wherein a leaf is defined asa node that is connected to the rest of the network via a single link inany of the spanning trees, and the method further comprises the stepsof: determining whether there is any node that is not a leaf; generatinga node failure spanning tree when a non-leaf node is found; andconnecting the non-leaf node to the node failure spanning tree via asingle link.
 11. The method according to claim 10, further comprisingthe steps of: determining whether there is a further non-leaf node; andif there is a further non-leaf node, connecting the further non-leafnode to the node failure spanning tree.
 12. The method according toclaim 11, further comprising removing a leaf node from the spanning treewhich node does not generate traffic.